Repository navigation
fix: parse rocm714 legacy variants as rocm 7.14 - #996
Conversation
Signed-off-by: David Holtz <david.richard.holtz@gmail.com>
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Coverage report —
|
| Name | Stmts | Miss | Cover | Missing |
|---|---|---|---|---|
| src/kernels/__init__.py | 14 | 0 | 100% | |
| src/kernels/_system.py | 6 | 1 | 83% | 10 |
| src/kernels/_versions.py | 130 | 14 | 89% | 53, 59-60, 63-64, 102, 165-170, 199, 219 |
| src/kernels/archs.py | 56 | 1 | 98% | 94 |
| src/kernels/backends.py | 252 | 47 | 81% | 43, 103, 163, 172, 181, 206, 215, 224, 248, 295, 311, 315, 319-344, 352, 375-395 |
| src/kernels/compat.py | 9 | 1 | 89% | 5 |
| src/kernels/deps.py | 70 | 1 | 99% | 56 |
| src/kernels/digest.py | 58 | 5 | 91% | 71-73, 136-137 |
| src/kernels/hf_hub.py | 62 | 2 | 97% | 21, 23 |
| src/kernels/importer.py | 74 | 5 | 93% | 158, 162, 165, 179-180 |
| src/kernels/install.py | 21 | 7 | 67% | 76-100 |
| src/kernels/layer/__init__.py | 7 | 0 | 100% | |
| src/kernels/layer/_interval_tree.py | 103 | 4 | 96% | 23, 52, 147, 150 |
| src/kernels/layer/device.py | 48 | 12 | 75% | 42, 47-49, 91, 96-98, 101, 149, 152, 156 |
| src/kernels/layer/func.py | 93 | 5 | 95% | 94, 119, 195, 315, 390 |
| src/kernels/layer/globals.py | 5 | 0 | 100% | |
| src/kernels/layer/inspect.py | 27 | 0 | 100% | |
| src/kernels/layer/kernelize.py | 84 | 6 | 93% | 306, 314-315, 328, 344-346 |
| src/kernels/layer/layer.py | 326 | 14 | 96% | 212, 259, 447, 608-609, 630, 638, 649, 690, 694, 707, 762, 803, 885 |
| src/kernels/layer/mode.py | 14 | 0 | 100% | |
| src/kernels/layer/repos.py | 136 | 36 | 74% | 32, 35-42, 73, 86, 90, 99-100, 103, 106-109, 116-117, 120, 123-126, 133-134, 137, 140-143, 150-151, 154, 157-160, 235 |
| src/kernels/load.py | 71 | 2 | 97% | 338, 378 |
| src/kernels/locking.py | 89 | 64 | 28% | 35-83, 91-98, 102-125, 137, 152-159, 165-175, 179-186 |
| src/kernels/python_deps.py | 58 | 6 | 90% | 59-60, 64-65, 101, 104 |
| src/kernels/resolver.py | 164 | 1 | 99% | 250 |
| src/kernels/status.py | 50 | 2 | 96% | 25, 79 |
| src/kernels/validate.py | 104 | 7 | 93% | 9, 101, 172, 195-196, 232-233 |
| src/kernels/variants.py | 424 | 11 | 97% | 217, 249, 501-502, 544-547, 549, 728-734 |
| src/kernels/verify.py | 102 | 6 | 94% | 44, 176-178, 266-267 |
| TOTAL | 2657 | 260 | 90% |
Updated by the Test kernels workflow on commit b00e94671eb74fd969960238fd7c86512461fe8e.
| # Legacy variant string: `rocmxy`, new variant string: `rocm-x.y`. The | ||
| # legacy major is one digit, or two starting with 1, so that `rocm714` is | ||
| # 7.14 and `rocm100` is 10.0. | ||
| _LEGACY_VARIANT_REGEX: ClassVar[re.Pattern] = re.compile(r"rocm(1\d|[2-9])(\d+)") |
There was a problem hiding this comment.
This breaks if they go to 20.something. Maybe we should switch to named captures for the legacy backend regexes, so that we can special-case 7.14?
There was a problem hiding this comment.
good point, I updated it to special case 7.14 with a lookahead rocm(7(?=14$)|\d+)(\d+) so everything else keeps the old split (rocm200 is 20.0, added a test for it). the groups stay positional so I didnt need named captures, but happy to switch the legacy regexes over if that is a better approach!
There was a problem hiding this comment.
update: decided to go with the named captures, the legacy backend regexes now use major/minor groups and rocm keeps the 7.14 special case rocm(?P<major>7(?=14$)|\d+)(?P<minor>\d+)
Signed-off-by: David Holtz <david.richard.holtz@gmail.com>
Signed-off-by: David Holtz <david.richard.holtz@gmail.com>
…1328) this pr fixes the nix install in `test-kernel-rocm` https://github.com/huggingface/kernels-community/actions/runs/43093355445/job/130795729876 tldr; the action restores its cached `nix-installer` owned by uid 1001 with mode `0110`, so its executable check fails as root in the container. `TAR_OPTIONS: --no-same-owner` restores it as root and keeps the cache note: kernels need `python3 scripts/update_flakes.py <kernel>` to pick up huggingface/kernels#996 before their rocm tests pass verified on the mi300 with activation bumped to kernels main, `torch215-rocm714` loads and passes https://github.com/huggingface/kernels-community/actions/runs/43285735858 Signed-off-by: David Holtz <david.richard.holtz@gmail.com>
this pr fixes #995
the legacy backend regexes now use named
major/minorcaptures and rocm special cases 7.14 (rocm(?P<major>7(?=14$)|\d+)(?P<minor>\d+)), sorocm714parses as 7.14 and every other version keeps the old splitresolve_local_kernelalso keeps the rejection reasons from every pass, previously thebuild/pass replaced them with an empty tracenote: the named captures came out of review so the 7.14 special case reads explicitly. it uses a lookahead since python
redoes not allow the same group name twice in an alternation. this only matters for 7.14 since kernel-builder builds no other two-digit minor, the dotted format from #985 avoids it going forwardanother note: the trace change is not needed for the parse fix, it only changes the error message. without it the ci error ended in an empty list instead of the rocm version rejection, which is what made this hard to track down
new cases in
test_parse_backend_formatsand a regression test for the trace, both fail without the fix